<?php
	class LinkModel extends Model{
		public $_validate =	array(
				array('type',array(1,2),'请确保友情链接类型合法!',Model::MUST_VALIDATE,'in'),
				array('webname','require','网站名称必须填写！'),
				array('webname','0,20','网站名称不得大于20位',Model::VALUE_VAILIDATE,'length'),
				array('weburl','require','网站地址必须填写！'),
				array('weburl','url','网站地址格式不正确!'),
		);
		
		public $_auto =	array(
				array('date','time',self::MODEL_INSERT,'function'),
				array('state','getState',Model:: MODEL_INSERT,'callback'),
		);
		
		//自动填充审核状态state未0，未审核
		public function getState(){
			return 0;
		}
	}
?>